import java.util.ArrayList;


public class HypothesisParameters {

	public static String[] columnNames = {"ArtistFamilarity","ArtistHotness","Duration","Loudness","SongHotness","Tempo","Year"};
	
	public ArrayList<Integer> trueIndecesAnte;
	public ArrayList<Integer> falseIndecesAnte;
	public ArrayList<Integer> trueIndecesSucc;
	public ArrayList<Integer> falseIndecesSucc;
	
	public HypothesisParameters(ArrayList<Integer> trueIndecesAnte, ArrayList<Integer> falseIndecesAnte,
			ArrayList<Integer> trueIndecesSucc, ArrayList<Integer> falseIndecesSucc){
		
		this.trueIndecesAnte = trueIndecesAnte;
		this.falseIndecesAnte =falseIndecesAnte;
		this.trueIndecesSucc =trueIndecesSucc;
		this.falseIndecesSucc = falseIndecesSucc;
		
	}
	
	public String getAnteString(boolean not)
	{
		String anteString = getIndexString(not, trueIndecesAnte, falseIndecesAnte);
		return anteString;
	}

	public String getSuccString(boolean not)
	{
		String anteString = getIndexString(not, trueIndecesSucc, falseIndecesSucc);
		return anteString;
	}

	private String getIndexString(boolean not, ArrayList<Integer> trueList, ArrayList<Integer> flaseList) {
		boolean startFlag = true;
		String cedent = "";
		for( int index : trueList )
		{
			if (!startFlag)
			{
				cedent += ", ";
			}
			else
			{
				startFlag = false;
			}
			if (not)
			{
				cedent += "low ";
			}
			else
			{
				cedent += "high ";
			}
			cedent += columnNames[index];
			
		}
		for( int index : flaseList )
		{
			if (!startFlag)
			{
				cedent += ", ";
			}
			else
			{
				startFlag = false;
			}
			if (not)
			{
				cedent += "high ";
			}
			else
			{
				cedent += "low ";
			}
			
			cedent += columnNames[index];
			
		}
		return cedent;
	}
}
